package com.coder.oj.system.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author Bosen 2022/11/25 17:15
 **/
@Data
public class ProblemVo implements Serializable {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("样例id")
    private Long id;

    @ApiModelProperty("题目名称")
    private String name;

    @ApiModelProperty("题目描述（markdown）")
    private String content;

    @ApiModelProperty("时间限制")
    private Long timeLimit;

    @ApiModelProperty("内存限制")
    private Long memoLimit;

    @ApiModelProperty("题目难度（0简单，1中等，2困难）")
    private Integer difficulty;

    @ApiModelProperty("题目来源")
    private String source;

    @ApiModelProperty("用户提交状态（true已通过，false尝试未通过，null未尝试）")
    private Boolean flag;

    @ApiModelProperty("状态（1启用，0禁用）")
    private Integer status;

    @ApiModelProperty("创建人")
    private String createBy;

    @ApiModelProperty("更新人")
    private String updateBy;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;
}
